<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户供应')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-userSupplyCard-edit" th:object="${userSupplyCard}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">总量：</label>
                <div class="col-sm-8">
                    <input name="total" th:field="*{total}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">已配送的数量：</label>
                <div class="col-sm-8">
                    <input name="sendTotal" th:field="*{sendTotal}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">配送卡状态:</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('userSupplyCardStatus')}">
                        <input type="radio" th:id="${'isHot_' + dict.dictCode}" name="status"
                               th:value="${dict.dictValue}" th:checked="${dict.default}"
                               th:field="*{status}">
                        <label th:for="${'isHot_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货人名称：</label>
                <div class="col-sm-8">
                    <input name="consigneeName" th:field="*{consigneeName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货人电话：</label>
                <div class="col-sm-8">
                    <input name="consigneeMobile" th:field="*{consigneeMobile}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地区：</label>
                <div class="col-sm-8">
                    <input name="area" th:field="*{area}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收货地址：</label>
                <div class="col-sm-8">
                    <input name="address" th:field="*{address}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/userSupplyCard";
        $("#form-userSupplyCard-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-userSupplyCard-edit').serialize());
            }
        }
    </script>
</body>
</html>